import type { GoodType } from '@/types/detail'
import type {
  AddUserAccountRequest,
  AgreeUserGroupSettingRequest,
  Base2UserGroupRequest,
  CalResponse,
  CancelSaveMoneyRequest,
  DelNoticeRequest,
  GetGoodTypesRequest,
  GetGoodTypesResponse,
  GetNoteAccountJobRequest,
  GetNoteAccountJobResponse,
  GetOneNoteAccountJobRequest,
  GetOneUserGroupSettingRequest,
  GetSaveMoneyAddRequest,
  GetSaveMoneyAddResponse,
  GetSaveMoneyResponse,
  NoAgreeUserGroupSettingRequest,
  SaveMoneyRequest,
  UnBindUserGroupSettingRequest,
} from '@/types/job'
import type {
  AddUserGroupSettingRequest,
  Notice,
  TaskInfo,
  UserGroupSetting,
} from '@/types/notelog'
import { http } from '@/utils/http'
/**
 * 获取数据
 * @param data 请求参数
 */
export const NoteAccountJobAPI = (data: GetNoteAccountJobRequest) => {
  return http<GetNoteAccountJobResponse[]>({
    method: 'POST',
    url: '/Job/GetNoteAccountJob',
    data,
  })
}
export const GetSaveMoneyAPI = (data: Base2UserGroupRequest) => {
  return http<GetSaveMoneyResponse[]>({
    method: 'POST',
    url: '/Plan/GetSaveMoney',
    data,
  })
}
export const GetSaveMoneyAddAPI = (data: GetSaveMoneyAddRequest) => {
  return http<GetSaveMoneyAddResponse>({
    method: 'POST',
    url: '/Plan/GetSaveMoneyAdd',
    data,
  })
}
export const CancelSaveMoneyAPI = (data: CancelSaveMoneyRequest) => {
  return http<{}>({
    method: 'POST',
    url: '/Plan/CancelSaveMoney',
    data,
  })
}
export const SaveMoneyAPI = (data: SaveMoneyRequest) => {
  return http<{}>({
    method: 'POST',
    url: '/Plan/SaveMoney',
    data,
  })
}
export const CalAPI = (data: Base2UserGroupRequest) => {
  return http<CalResponse[]>({
    method: 'POST',
    url: '/Smart/Cal',
    data,
  })
}
export const GetOneNoteAccountJobAPI = (data: GetOneNoteAccountJobRequest) => {
  return http<GetNoteAccountJobResponse>({
    method: 'POST',
    url: '/Job/GetOneNoteAccountJob',
    data,
  })
}
export const GetOneNoticeAPI = (data: GetOneNoteAccountJobRequest) => {
  return http<Notice>({
    method: 'POST',
    url: '/Notice/GetOneNotice',
    data,
  })
}
export const GetOneUserGroupSettingAPI = (data: GetOneUserGroupSettingRequest) => {
  return http<UserGroupSetting>({
    method: 'POST',
    url: '/User/GetOneUserGroupSetting',
    data,
  })
}
export const GetOneTaskAPI = (data: GetOneNoteAccountJobRequest) => {
  return http<TaskInfo>({
    method: 'POST',
    url: '/Task/GetOneTask',
    data,
  })
}
export const AddNoteAccountJobAPI = (data: GetNoteAccountJobResponse) => {
  return http<{}>({
    method: 'POST',
    url: '/Job/AddNoteAccountJob',
    data,
  })
}
export const AddNoticeAPI = (data: Notice) => {
  return http<{}>({
    method: 'POST',
    url: '/Notice/AddNotice',
    data,
  })
}
export const AddUserGroupSettingAPI = (data: AddUserGroupSettingRequest) => {
  return http<{}>({
    method: 'POST',
    url: '/User/AddUserGroupSetting',
    data,
  })
}
export const AddTaskAPI = (data: TaskInfo) => {
  return http<{}>({
    method: 'POST',
    url: '/Task/AddTask',
    data,
  })
}
export const UpdateNoticeAPI = (data: Notice) => {
  return http<{}>({
    method: 'POST',
    url: '/Notice/UpdateNotice',
    data,
  })
}
export const UpdateTaskAPI = (data: TaskInfo) => {
  return http<{}>({
    method: 'POST',
    url: '/Task/UpdateTask',
    data,
  })
}
export const UpdateSaveMoneyAPI = (data: GetSaveMoneyAddResponse) => {
  return http<{}>({
    method: 'POST',
    url: '/Plan/UpdateSaveMoney',
    data,
  })
}
export const AddUserAccountAPI = (data: AddUserAccountRequest) => {
  return http<{}>({
    method: 'POST',
    url: '/Account/AddUserAccount',
    data,
  })
}
export const UpdateNoteAccountJobAPI = (data: GetNoteAccountJobResponse) => {
  return http<{}>({
    method: 'POST',
    url: '/Job/UpdateNoteAccountJob',
    data,
  })
}
export const DelNoteAccountJobAPI = (data: GetOneNoteAccountJobRequest) => {
  return http<{}>({
    method: 'POST',
    url: '/Job/DelNoteAccountJob',
    data,
  })
}
export const DelNoticeAPI = (data: DelNoticeRequest) => {
  return http<{}>({
    method: 'POST',
    url: '/Notice/DelNotice',
    data,
  })
}
export const AgreeUserGroupSettingAPI = (data: AgreeUserGroupSettingRequest) => {
  return http<{}>({
    method: 'POST',
    url: '/User/AgreeUserGroupSetting',
    data,
  })
}
export const UnBindUserGroupSettingAPI = (data: UnBindUserGroupSettingRequest) => {
  return http<{}>({
    method: 'POST',
    url: '/User/UnBindUserGroupSetting',
    data,
  })
}
export const NoAgreeUserGroupSettingAPI = (data: NoAgreeUserGroupSettingRequest) => {
  return http<{}>({
    method: 'POST',
    url: '/User/NoAgreeUserGroupSetting',
    data,
  })
}
export const DelTaskAPI = (data: DelNoticeRequest) => {
  return http<{}>({
    method: 'POST',
    url: '/Task/DelTask',
    data,
  })
}
export const GetGoodTypesAPI = (data: GetGoodTypesRequest) => {
  return http<GetGoodTypesResponse[]>({
    method: 'POST',
    url: '/Job/GetGoodTypes',
    data,
  })
}
